package com.tencreat.domain.mall;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tencreat.common.annotation.Excel;
import com.tencreat.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;


/**
 * 拼团用户对象 mall_goods_collage_order
 *
 * @author tencreat
 * @date 2022-01-25
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
@TableName("mall_goods_collage_order")
public class MallGoodsCollageOrder extends BaseEntity<MallGoodsCollageOrder> {
    private static final long serialVersionUID = 1L;


    /** 商城拼团订单 */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "ID")
    private Integer id;
    /****
     * 发起人订单
     */
    @TableField("`pid`")
    private Long pid;
    /** 拼团id */
    @Excel(name = "拼团id")
    @ApiModelProperty(value= "拼团id")
    @TableField("`collage_id`")
    private Long collageId;


    /** 拼团编号 */
    @Excel(name = "拼团编号")
    @ApiModelProperty(value= "拼团编号")
    @TableField("`collage_sn`")
    private String collageSn;


    /** 订单编号 */
    @Excel(name = "订单编号")
    @ApiModelProperty(value= "订单编号")
    @TableField("`order_sn`")
    private String orderSn;


    /** 用户uid */
    @Excel(name = "用户uid")
    @ApiModelProperty(value= "用户uid")
    @TableField("`uuid`")
    private Long uuid;


    /** 商品id */
    @Excel(name = "商品id")
    @ApiModelProperty(value= "商品id")
    @TableField("`goods_id`")
    private Long goodsId;


    /** 是否为发起人 1 是 0 否 */
    @Excel(name = "是否为发起人 1 是 0 否")
    @ApiModelProperty(value= "是否为发起人 1 是 0 否")
    @TableField("`sponsor`")
    private Integer sponsor;


    /** 货品id */
    @Excel(name = "货品id")
    @ApiModelProperty(value= "货品id")
    @TableField("`product_id`")
    private Long productId;


    /** 用户昵称 */
    @Excel(name = "用户昵称")
    @ApiModelProperty(value= "用户昵称")
    @TableField("`user_nick_name`")
    private String userNickName;


    /** 用户头像 */
    @Excel(name = "用户头像")
    @ApiModelProperty(value= "用户头像")
    @TableField("`user_head_img`")
    private String userHeadImg;


    /** 拼团结束时间 */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "拼团结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("`end_time`")
    private LocalDateTime endTime;


    /** 拼团最多人数 */
    @Excel(name = "拼团最多人数")
    @ApiModelProperty(value= "拼团最多人数")
    @TableField("`collage_peoples`")
    private Long collagePeoples;


    /** 拼团剩余人数 */
    @Excel(name = "拼团剩余人数")
    @ApiModelProperty(value= "拼团剩余人数")
    @TableField("`collage_remaining`")
    private Integer collageRemaining;


    /** 拼团状态 1拼团成功 2拼团中 3拼团失败 */
    @Excel(name = "拼团状态 1拼团成功 2拼团中 3拼团失败")
    @ApiModelProperty(value= "拼团状态 1拼团成功 2拼团中 3拼团失败")
    @TableField("`collage_status`")
    private Integer collageStatus;


    /** 删除标志（0代表存在 2代表删除） */
    @TableLogic
    @TableField("`del_flag`")
    private String delFlag;






    /** 租户ID */
    @Excel(name = "租户ID")
    @ApiModelProperty(value= "租户ID")
    @TableField("`tenant_id`")
    private Long tenantId;


}
